package CI.aufgabe2.cip.mynodes;

import java.util.List;

import CI.aufgabe2.cip.SymbolTable;
import CI.aufgabe2.cip.base.AbstractDescr;

public class MyFormalParametersNode extends MyAbstractNode {

	private static final long serialVersionUID = 1L;

	private final List<MyFPSectionNode> FPSectionListList;

	public MyFormalParametersNode(List<MyFPSectionNode> FPSectionList) {
		this.FPSectionListList = FPSectionList;
	}

	public List<MyFPSectionNode> getList(){
		return this.FPSectionListList;
	}
	@Override
	public void print() {
		trace("FormalParametersNode ");
		if (FPSectionListList != null)
			for (MyFPSectionNode FPSectionList : FPSectionListList) {
				if (FPSectionList != null)
					FPSectionList.print();
			}
		unindent();

	}
	
	
	public AbstractDescr compile(SymbolTable sym){
    	for(MyFPSectionNode node : FPSectionListList){
    		node.compile(sym);
    	}
    	return null;
    } 
    
    public int getSize(){
    	int size = 0;
    	for(MyFPSectionNode node : FPSectionListList){
    		size += node.getSize();
    	}
    	return size;
    }
}
